package com.douqu.game.core.i;

import com.douqu.game.core.entity.Player;
import com.douqu.game.core.entity.activity.DirectEndData;
import com.douqu.game.core.entity.activity.MatchBaseInfo;
import com.douqu.game.core.entity.battle.BattleDetail;
import com.douqu.game.core.entity.battle.BattleResultParam;
import com.douqu.game.core.entity.battle.BattleResultParamCampSingle;
import com.douqu.game.core.entity.battle.BattleTemp;
import com.douqu.game.core.entity.world.map.ErrorEndParam;
import com.douqu.game.core.factory.DataFactory;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

/**
 * Author : Bean
 * 2017-07-07 9:55
 */
public interface IMainServer extends Remote {

   void battleInit(int serverId, String battleId) throws RemoteException;

   void battleStart(BattleDetail battleInfo) throws RemoteException;

   void campBattleStart(int battleType, String playerIndex, int teamNo) throws RemoteException;

   BattleResultParam battleEnd(BattleDetail battleDetail) throws RemoteException;

   BattleResultParamCampSingle campBattleEnd(int battleDetailType, boolean win, BattleTemp battleTemp, MatchBaseInfo target, String playerIndex) throws RemoteException;

   void directEndBattle(DirectEndData directEndData) throws RemoteException;;

   void updateStatus(String playerIndex, String status) throws RemoteException;

//   void updateStatusByPlayers(String status, List<String> playerIndexList) throws RemoteException;

   Player getOnlinePlayer(String playerIndex) throws RemoteException;

   Player getOfflinePlayer(String playerIndex) throws RemoteException;

   Player getPlayer(String playerIndex) throws RemoteException;

   DataFactory getDataFactory() throws RemoteException;

   BattleTemp getBattleTemp(int battleType, String objectIndex, String... masterPlayerIndex) throws RemoteException;

   boolean checkCampBattle(String playerIndex) throws RemoteException;

   String test() throws RemoteException;

   void battleErrorEnd(List<String> playerIndexList) throws RemoteException;

   void mapBattleErrorEnd(List<ErrorEndParam> errorEndParamList) throws RemoteException;
}
